package com.ktjy.member.domain;

import lombok.Data;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ktjy.common.annotation.Excel;
import com.ktjy.common.core.domain.BaseEntity;

/**
 * 微信小程序端的会员对象 t_wx_user
 *
 * @author ktjy
 * @date 2025-03-17
 */
@Data
@TableName("t_wx_user")
public class WxUser extends BaseEntity {
private static final long serialVersionUID=1L;

        /** 会员编号 */
            @TableId(value = "id" , type = IdType.AUTO)
        private Long id;

        /** 会员名称 */
                @Excel(name = "会员名称")
            @TableField(value = "username")
        private String username;

        /** 密码 */
            @TableField(value = "password")
        private String password;

        /** 性别 */
                @Excel(name = "性别")
            @TableField(value = "gender")
        private Integer gender;

        /** 生日 */
                @JsonFormat(pattern = "yyyy-MM-dd")
                @Excel(name = "生日" , width = 30, dateFormat = "yyyy-MM-dd")
            @TableField(value = "birthday")
        private Date birthday;

        /** 最近一次登录时间 */
            @TableField(value = "last_login_time")
        private String lastLoginTime;

        /** 最近一次登录IP地址 */
            @TableField(value = "last_login_ip")
        private String lastLoginIp;

        /** 会员等级 */
                @Excel(name = "会员等级")
            @TableField(value = "user_level")
        private Integer userLevel;

        /** 会员昵称 */
                @Excel(name = "会员昵称")
            @TableField(value = "nickname")
        private String nickname;

        /** 手机号码 */
                @Excel(name = "手机号码")
            @TableField(value = "mobile")
        private String mobile;

        /** 会员头像 */
                @Excel(name = "会员头像")
            @TableField(value = "avatar")
        private String avatar;

        /** 微信登录openid */
            @TableField(value = "open_id")
        private String openId;

        /** 微信登录会话KEY */
            @TableField(value = "session_key")
        private String sessionKey;

        /** 状态 */
                @Excel(name = "状态")
            @TableField(value = "enabled")
        private Integer enabled;

        /** 家庭住址 */
                @Excel(name = "家庭住址")
            @TableField(value = "fullLocation")
        private String fullLocation;

        /** 职业 */
                @Excel(name = "职业")
            @TableField(value = "profession")
        private String profession;


@Override
public String toString(){
    return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
        .append("id" ,getId())
        .append("username" ,getUsername())
        .append("password" ,getPassword())
        .append("gender" ,getGender())
        .append("birthday" ,getBirthday())
        .append("lastLoginTime" ,getLastLoginTime())
        .append("lastLoginIp" ,getLastLoginIp())
        .append("userLevel" ,getUserLevel())
        .append("nickname" ,getNickname())
        .append("mobile" ,getMobile())
        .append("avatar" ,getAvatar())
        .append("openId" ,getOpenId())
        .append("sessionKey" ,getSessionKey())
        .append("enabled" ,getEnabled())
        .append("createTime" ,getCreateTime())
        .append("updateTime" ,getUpdateTime())
        .append("fullLocation" ,getFullLocation())
        .append("profession" ,getProfession())
        .append("createBy" ,getCreateBy())
        .append("updateBy" ,getUpdateBy())
        .append("remark" ,getRemark())
            .toString();
}
        }